package com.weishi.project.training.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.weishi.framework.web.domain.AjaxResult;
import com.weishi.project.api.vo.*;
import com.weishi.project.sport.home.vo.ClassifiedTotalVO;
import com.weishi.project.sport.home.vo.GetLandGlidingSumVO;
import com.weishi.project.sport.home.vo.ThisWeekTrainingDataVO;
import com.weishi.project.sport.movement.vo.ReturnTrainingDayVO;
import com.weishi.project.training.domain.TrainingDay;
import com.weishi.project.training.domain.TrainingWeek;
import com.weishi.project.training.vo.TrainingDayAddVo;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * trainingDayService接口
 */
public interface ITrainingDayService extends IService<TrainingDay> {

    /**
     * 查询trainingDay列表
     */
    List<TrainingDay> selectTrainingDayList(TrainingDay trainingDay);

    List<TrainingWeek> getWeekName();

    TrainingDay getTrainingDayById(int id);

    void updateTrainingWeekById(TrainingDay trainingDay);

    List<TrainingDay> selectTrainingDayListByNaturalYearId(int naturalYearId);

    List<Map<String, Object>> selectWeekTrainingData(WeekTrainingCompletionVo weekTrainingCompletionVo);

    List<Map<String, Object>> weekTrainingAchievementCompletion(WeekTrainingCompletionVo weekTrainingCompletionVo);

    List<TrainingDay> selectTrainingDayListByDay(String day);

    List<Map<String,Object>> waterSpecialPromotion(WaterSpecialPromotionVo waterSpecialPromotionVo);

    List<TrainingDay> selectTrainingDayBeforedawn(String day);

    List<TrainingDay> selectTrainingDayMorning(String day);

    List<TrainingDay> selectTrainingDayAfternoon(String day);

    List<TrainingDay> selectTrainingDayNight(String day);

    int getIdByFourSeasonsAndFirstLevelAndDay(Map<String,Object> map);

    int getIdByWeekIdAndDay(Map<String,Object> map);

    List<TrainingDayDetailsVo> getTrainingDayListDetails(TrainingDayDetailsVo trainingDayDetailsVo);

    List<TrainingDayWeekOrDayVo> getTrainingDayWeekOrDayVo(Map<String,Object> params);

    List<TrainingDayKilometerWeekOrDayVo> getTrainingDayKilometerWeekOrDayVo(Map<String,Object> params);

    List<TrainingDaySecondLevelHourWeekOrDayVo> getTrainingDaySecondLevelHourWeekOrDayVo(Map<String,Object> params);

    List<TrainingDayKilometerSecondLevelWeekOrDayVo> getTrainingDayKilometerSecondLevelWeekOrDayVo(Map<String,Object> params);

    @Override
    boolean updateById(TrainingDay entity);

    boolean save(TrainingDay entity,boolean addTrainingGroup);

    @Override
    boolean saveOrUpdate(TrainingDay entity);

    /**
     * 汇总训练项目数据
     * @param trainingDayId
     */
    void aggregateData(Integer trainingDayId);

    List<TrainingDay> getTrainingDayByWeekId(Integer oldWeekId);


    /**
     * 训练数据查询运动员训练距离
     */
    Integer getDistance(Integer sportsmanId);


    /**
     * 训练数据查询运动员训练 水上训练次数
     */
    Integer getWaterFrequency(Integer sportsmanId);


    /**
     * 训练数据查询运动员训练 陆上训练次数
     */
    Integer getLandNumber(Integer sportsmanId);


    /**
     * 查询运动员身体准备训练--根据传参-年-查询所有月的统计 ( 按照 分钟 统计 )
     */
    Double getPrepareMonth(Integer userId , String years , List<String> dayList);


    /**
     * 查询返回值  一年中 二级科目的时间占比
     */
    Double getReturnLevelTwoVO(Integer userId , String years , String ballGames , List<String> dayList);


    /**
     * 根据年 来统计 运动员身体准备训练时间 二级科目 所占的百分比
     */
    Integer getStringVO( Integer userId , String years , String ballGames , List<String> dayList );


    /**
     * 获取训练项目的详细信息，包括航道，小组
     * @param id
     * @return
     */
    Map<String,Object> getTrainingDayInfoById1(Integer id);


    /**
     * 水上专项训练 训练距离 滑行时间 统计
     */
    Double returnMonthVO(String year , Integer userId ,Integer trainingMode , List<String> dayList);


    /**
     * 水上专项训练 训练时间 滑行距离 统计
     */
    Double returnMonthTimeVO(String year , Integer userId ,Integer trainingMode , List<String> dayList);


    /**
     * 运动员 -- 本周训练数据
     */
    List<ThisWeekTrainingDataVO> getThisWeekTrainingDataVO(String day);


    /**
     * 运动员 -- 根据训练分类查询总计
     */
    List<ClassifiedTotalVO> getClassifiedTotal(String day , Integer userId);


    /**
     * 运动员 -- 首页 --根据年查询各科训练时间占比
     * 查询除了 水上专项训练和陆上专项训练的其它数据
     */
    List<ClassifiedTotalVO> getClassifiedTotalTwo(String day);


    /**
     * 运动员 -- 首页 -- 陆上专项滑行统计 Sum
     */
    List<GetLandGlidingSumVO> getLandGlidingSum(String year , Integer userId , Integer trainingMode , List<String> dayList);


    /**
     * 运动员端--查询运动计划详情
     */
    List<ReturnTrainingDayVO> getSportsPlanDetails(Integer userId , Integer id);


    /**
     * 运动员端--查询运动--乳酸
     */
    List<String> getLacticAcid(Integer userId , String firstLevel , Integer trainingMode , Integer groupId , Integer trainingDayId);


    /**
     * 运动员端--查询运动--专项成绩信息
     */
    List<ReturnTrainingDayVO> getWaterInformation(Integer userId , Integer id , Integer trainingMode , String firstLevel , Integer groupId);


    /**
     * 查询运动员专项最好成绩
     */
    String getPersonalBest(String boatType , Integer idealKilometers , Integer userId , Integer trainingMode , String firstLevel);


    void addTrainingDayAndTrainingGroup(TrainingDayAddVo trainingDayAddVo);


    /**
     * 运动员端--查询运动计划详情第二次查询
     */
    List<ReturnTrainingDayVO> getSportsPlanDetailsTwo(Integer id , Integer userId);


    boolean removeByIds(List<Integer> idList);

    boolean removeById(Integer trainingId);


    /**
     * 删除训练日项目,与课程相关的所有数据都删除
     */
    AjaxResult deleteRelatedData(Integer id);




}